package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.UserInfoMapper;
import priv.mill.entry.UserInfo;
import priv.mill.server.UserInfoService;

@Component
public class UserInfoServiceImpl implements UserInfoService{

	private static final Logger logger = Logger
			.getLogger(UserInfoServiceImpl.class);

	@Autowired
	private UserInfoMapper userInfoMapper;
	
	@Override
	public UserInfo getUserInfoById(Integer userInfoId) {
		return userInfoMapper.getUserInfoById(userInfoId);
	}

	@Override
	public UserInfo getUserInfoByEntry(UserInfo userInfo) {
		return userInfoMapper.getUserInfoByEntry(userInfo);
	}

	@Override
	public List<UserInfo> getUserInfosByPage(UserInfo userInfo) {
		return userInfoMapper.getUserInfosByPage(userInfo);
	}

	@Override
	public int updateUserInfo(UserInfo userInfo) {
		return userInfoMapper.updateUserInfo(userInfo);
	}

	@Override
	public int insertUserInfo(UserInfo userInfo) {
		return userInfoMapper.insertUserInfo(userInfo);
	}

	@Override
	public int deleteUserInfo(Integer userInfoId) {
		return userInfoMapper.deleteUserInfo(userInfoId);
	}

	@Override
	public List<UserInfo> getUserInfoLikeName(UserInfo user) {
		return userInfoMapper.getUserInfoLikeName(user);
	}
}
